VNA control

scikit-rf has a few virtual instrument classes, located in the skrf.vi module. This page demonstrates the basic control of a PNA


In [ ]:
from skrf.vi import vna 

p =vna.PNA("TCPIP0::192.168.0.2::INSTR")
p.idn

In [ ]:
ntwks =  p.get_network_all_meas()

In [ ]:
[k.plot_s_db(label = k.name) for k in ntwks]

Interactive


In [ ]:
from IPython.html.widgets import interact, interactive, fixed
from IPython.html import widgets
from IPython.display import clear_output, display, HTML

In [ ]:
import matplotlib
matplotlib.use('nbagg')

freq= p.frequency
f_start = freq.start/1.e9
f_stop = freq.stop/1.e9
f_npts = 101
f_range =(f_start, f_stop,1)
f_range

def dummy(f_start=f_start,f_stop=f_stop):
    p.frequency = rf.Frequency(f_start, f_stop,f_npts,'ghz')
    p.get_twoport().plot_s_db()
    

interact(dummy,f_start=f_range,f_stop=f_range)